import java.io.*;

public class ChatClientRecord implements Serializable {
    public String name;//client's username
    public String ip;//client's ip
    public int port;//port the client is listening on
    public long lastHeartbeat;//used on the server only (note it's not used in the 'equals' method)

    public ChatClientRecord(String name, String ip, int port) {
        this.name = name;
        this.ip = ip;
        this.port = port;
    }

    public boolean equals(Object o){
        ChatClientRecord rec = (ChatClientRecord)o;
        return (name.equals(rec.name) && ip.equals(rec.ip) && port == rec.port)? true : false;
    }
}
